#include <catch2/catch.hpp>

#include "056_medium.hpp"

using namespace jianzhi_056;

TEST_CASE("056", "[JIANZHI][056]")
{

SECTION("056-I") {
    SECTION("example 1") {
        std::vector<int> nums{4,1,4,6};
        auto single_nums = Solution().singleNumbers(nums);
        CAPTURE(single_nums);
        CHECK( (single_nums == std::vector{1,6} || single_nums == std::vector{6,1}) );
    }

    SECTION("example 2") {
        std::vector<int> nums{1,2,10,4,1,4,3,3};
        auto single_nums = Solution().singleNumbers(nums);
        CAPTURE(single_nums);
        CHECK( (single_nums == std::vector{2,10} || single_nums == std::vector{10,2}) );
    }
}

SECTION("056-II") {

CHECK(Solution().singleNumber({3,4,3,3}) == 4);
CHECK(Solution().singleNumber({9,1,7,9,7,9,7}) == 1);

}

}
